package cn.com.taiji.oospub.wechat.service.impl;

import cn.com.taiji.oospub.wechat.entity.GetOrderSetup;
import cn.com.taiji.oospub.wechat.mapper.GetOrderSetupMapper;
import cn.com.taiji.oospub.wechat.service.IGetOrderSetupService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 
 * @since 2020-10-28
 */
@Service
public class GetOrderSetupServiceImpl extends ServiceImpl<GetOrderSetupMapper, GetOrderSetup> implements IGetOrderSetupService {

    @Autowired
    private GetOrderSetupMapper getOrderSetupMapper;
    @Override
    public List<GetOrderSetup> listGetOrderSetupBySchoolId(String id) {
        QueryWrapper<GetOrderSetup> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("School_Id", id);
        return getOrderSetupMapper.selectList(queryWrapper);
    }

    @Override
    public List<GetOrderSetup> listGetOrderSetupBySchoolIdQY(String id) {
        QueryWrapper<GetOrderSetup> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("School_Id", id);
        queryWrapper.eq("status", "qy");
        return getOrderSetupMapper.selectList(queryWrapper);
    }
}
